package com.ttwl.www.app.meFrame.personInfoFrame;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ttwl.www.app.R;

/**
 * Created by Administrator on 2017/10/27 0027.
 */

public class LinearAdapterFans extends RecyclerView.Adapter<LinearAdapterFans.LinearViewHolder> {
    private Context mContext;
    //创建一个方法
    public LinearAdapterFans(Context context) {
        this.mContext = context;
    }
    @Override
    public LinearAdapterFans.LinearViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new LinearViewHolder(LayoutInflater.from(mContext).inflate(R.layout.fg_personhome_fans_item,parent,false));
    }

    @Override
    public void onBindViewHolder(LinearAdapterFans.LinearViewHolder holder, int position) {
        //设置item中的值
        // holder.tvTitle.setText("");

    }

    @Override
    public int getItemCount() {
        return 2;
    }

    class LinearViewHolder extends RecyclerView.ViewHolder{
        private TextView tvTitle;
        public LinearViewHolder(View itemView) {
            super(itemView);
            tvTitle = (TextView) itemView.findViewById(R.id.tv_title);
        }
    }
}
